package cn.edu.hqu.cst.lecture01_01.api;

import java.util.ArrayList;
import java.util.List;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import cn.edu.hqu.cst.lecture01_01.domain.Taco;

@RestController
@RequestMapping(value={"/api/v1"},method=RequestMethod.GET)
public class ApiController {
	@GetMapping(value="/tacoInfo")
	public Taco tacoInfo() {
		Taco taco=new Taco();
		taco.setName("SimpleTaco");
		List<String> ingredients=new ArrayList<String>();
		ingredients.add("Lettuce");
		ingredients.add("Cheddar");
		ingredients.add("Salsa");
		ingredients.add("Ground Beef");
		taco.setIngredients(ingredients);
		return taco;
	}
	

}
